#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>  

void convert_to_base12(int num) {
	char base12[100];
	int i = 0;
	while (num >0) {
		int remainder = num % 12;
		if (remainder < 10) {
			base12[i++] = remainder + 48;
		}
		else {
			base12[i++] = remainder + 55;
		}
		num /= 12;
	}
	for (int j = i - 1; j >= 0; j--) {
		printf("%c", base12[j]);
	}
}

int main() {
	int num;
	while (1)
	{


		printf("base 10:");
		scanf("%d", &num);
		if (num < 0) {

			printf("Bye!\n");

			return 0;
		}

		else if (num > 0) {
			printf("base 12=");
			convert_to_base12(num);
			printf("\n");
		}
		else {

			printf("base 12=0\n");

		}
	}
	return 0;
}
